import 'package:kkhousekeep/generated/json/base/json_field.dart';
import 'package:kkhousekeep/generated/json/repair_department_list_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class RepairDepartmentListEntity {
	late int code;
	late List<RepairDepartmentListObj> obj;
	late String msg;

	RepairDepartmentListEntity();

	factory RepairDepartmentListEntity.fromJson(Map<String, dynamic> json) => $RepairDepartmentListEntityFromJson(json);

	Map<String, dynamic> toJson() => $RepairDepartmentListEntityToJson(this);

	RepairDepartmentListEntity copyWith({int? code, List<RepairDepartmentListObj>? obj, String? msg}) {
		return RepairDepartmentListEntity()
			..code= code ?? this.code
			..obj= obj ?? this.obj
			..msg= msg ?? this.msg;
	}

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class RepairDepartmentListObj {
	late int id;
	late String name;

	RepairDepartmentListObj();

	factory RepairDepartmentListObj.fromJson(Map<String, dynamic> json) => $RepairDepartmentListObjFromJson(json);

	Map<String, dynamic> toJson() => $RepairDepartmentListObjToJson(this);

	RepairDepartmentListObj copyWith({int? id, String? name}) {
		return RepairDepartmentListObj()
			..id= id ?? this.id
			..name= name ?? this.name;
	}

	@override
	String toString() {
		return jsonEncode(this);
	}
}